package com.gljx.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gljx.web.Entity.PersonEntrys;
import com.gljx.web.dao.CommonDao;
import com.gljx.web.dao.PersonEntrysMapper;
import com.gljx.web.service.PersonEntrysService;

@Transactional
@Service
public class PersonEntrysServiceImpl extends CommonDao implements PersonEntrysService{

	@Autowired
	private PersonEntrysMapper personEntrysMapper;
	
	/**
	 * 实现添加
	 */
	@Override
	public void addPersonEntrys(PersonEntrys personEntrys) {
		// TODO Auto-generated method stub
		personEntrysMapper.insertSelective(personEntrys);
	}


	/**
	 * 实现根究父类id删除
	 */
	@Override
	public void deleteByFparentId(String fparentId) {
		// TODO Auto-generated method stub
		personEntrysMapper.deleteByFparentId(fparentId);
	}


	/**
	 * 实现根究父类id查询
	 */
	@Override
	public List<PersonEntrys> queryPersonEntrysByFparentid(String fparentId) {
		// TODO Auto-generated method stub
		return personEntrysMapper.selectPersonEntrysByFparentid(fparentId);
	}

	@Override
	public void updatePersonEntrysByFid(PersonEntrys personEntrys) {
		personEntrysMapper.updateByPrimaryKeySelective(personEntrys);
	}

}
